#include<stdio.h>


void scan_arr(int arr[], int length)
{
	int i = 0;
	while (i < length) 
	{
		int j = 0;
		scanf("%d ", &j);
		arr[i] = j;
		i++;
	}
	return arr;
}

void print_arr(char arr, int length)
{
    int i = 0;
    while (i < length)
    {
        char* tmp = arr[i];
        printf("%s ", &tmp);
    }
}

int main()
{
	int arr[10] = { 0 };
	scan_arr(arr, sizeof(arr));
	int i = sizeof(arr);
	while (i)
	{
		if (arr[i] % 2 == 0)
		{
			int tmp = arr[i];
			arr[i - 1] = tmp;
			arr[i] = arr[i - 1];
		}
		i--;
	}
	print_arr(arr, sizeo(arr)
	return 0;
}